package com.rc.common.constant;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 公共状态返回码
 * @author sym
 */
@Getter
@AllArgsConstructor
public enum Code{
    OK(0,"操作成功"),

    ARG_VALID_ERROR(10001,"参数错误"),
    SERVER_ERROR(10002,"服务器错误"),
    UNKNOWN_ERROR(10003,"未知错误,请联系管理员！"),

    NO_LOGIN(20001,"没有登录"),
    CODE_ERROR(20002,"用户登录异常" ),
    INSUFFICIENT_BALANCE(20003,"余额不足" ),
    NO_SUCH_USER(20004, "没有这个用户"),
    USER_EXISTED(20005,"用户已存在"),
    PASSWORD_ERROR(20005,"密码错误" ),
    ROLE_ERROR(20005,"角色错误" ),

    NO_SUCH_FARM(30001,"没有这个农场" ),
    UPDATE_FARM_FAILED(30002,"更新农场失败" ),
    NO_SUCH_AREA(30003,"没有这个区域" ),
    NO_SUCH_PLANT(30004,"没有这个植物" ),
    NO_SUCH_ACTIVITY(30005,"没有这个活动"),
    ADOPTION_EXITED(30006,"已存在该类型的认养活动"),
    NO_SUCH_ADOPTION(30007,"该认养活动不存在"),
    APPROVAL(30008,"该记录审核过了"),
    PLANT_HAS_AREA(300009,"该植物下还有关联的园区"),
    NO_SUCH_VIDEO(300010, "没有这个科普特视频"),
    AREA_HAS_ACTIVITY(3000011,"该园区下还有关联活动"),
    IS_COLLECT(3000012,"您已经收藏过了" ),
    NO_SUCH_COLLECT(3000013,"这个东西不存在" ),
    IS_COMMENTED(3000014,"您已经评论过了" ),
    NO_TREE(3000015,"该品种已经没有足够的果树可以认养了" ),
    TREE_HAS_ADOPTION(3000016,"该作物被认养了，不能删除"),
    USER_HAS_FARM(40003, "这个用户还在管理农庄，请先删除农庄"),

    ORDER_STATUS_EXCEPTION(40001,"订单状态异常" ),
    APPLY_EXITED(40002,"您已经申请过了" ), ;

    final int code;
    final String msg;
}

